<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作业24</title>
    <script>
        for(var i=1000; i<10000; i++){
            var numQian = parseInt(i/1000);
            var numBai = parseInt(i%1000/100);
            var numShi = parseInt(i%100/10);
            var numGe = i%10;

            var sum = numQian**4 + numBai**4 + numShi**4 + numGe**4;

            if(sum == i){
                console.log(i);
            }
        }
    </script>
</head>
<body>
    
</body>
</html>